# -*- coding: utf-8 -*-
from 考试系统.数据处理层 import check
from 考试系统.数据处理层 import yzm
from 考试系统.数据处理层.shuju import tea
from 考试系统.数据处理层.shuju import stu
def number_or_name_and_password(shu,password):
    flag =0
    if check.name_check(shu):
        flag=1
    if check.number_check(shu):
        flag=1
    if flag and check.password_check(password):
        return True
    else:
        return False
def number_find_password(number):
    teacher_number = tea.tea_number_find_password(number)
    stu_number = stu.stu_number_find_password(number)
    if stu_number!=None:
        return stu_number
    if teacher_number!=None:
        return teacher_number
    return None

def num_find_id(number):
    teacher_number = tea.tea_number_find_id(number)
    stu_number = stu.stu_number_find_id(number)
    if stu_number != None:
        return stu_number
    if teacher_number != None:
        return teacher_number
    return None



